import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom'
import MyNavLink from '../../componenets/MyNavLink';
import News from './News';
import Message from './Message';
export default class Home extends React.Component {
  render() {
    return (
      <div>
        <h3>home</h3>
        <ul className="nav nav-tabs">
          <li>
            {/* <a class="list-group-item active" href="./home-news.html">
              
            </a> */}
            <MyNavLink replace to="/home/news">News</MyNavLink>
          </li>
          <li>
            {/* <a class="list-group-item " href="./home-message.html">
              Message
            </a> */}
            <MyNavLink replace to="/home/message">Message</MyNavLink>
          </li>
        </ul>
        <Switch>
          <Route path="/home/news" exact={true} component={News}></Route>
          <Route path="/home/message" component={Message}></Route>
          <Redirect to="/home/news"></Redirect>
        </Switch>
        {/* <News></News>
        <Message></Message> */}
      </div>
    );
  }
}
